package com.hexinfo.dmpro.monitor.model;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;

import java.util.List;

/**
 * @author peng
 * @date 2021/10/8 14:35
 */
@Data
public class YarnSchedulerModel {

    /**
     * Scheduler type - fairScheduler
     * type of the queue - fairSchedulerLeafQueueInfo
     */
    public String type;
    /**
     * 队列可以拥有的最大应用程序数
     */
    public String maxApps;
    /**
     * 队列名称
     */
    public String queueName;

    @JSONField(name = "MinResources")
    public QueuesResources minResources;
    @JSONField(name = "maxResources")
    public QueuesResources maxResources;
    @JSONField(name = "usedResources")
    public QueuesResources usedResources;

    public ChildQueues childQueues;
    /**
     * 子队列信息
     */

    @Data
    public class ChildQueues{
        @JSONField(name = "queue")
        private List<YarnSchedulerModel> queue;
    }
    @Data
    public class QueuesResources{
        private long memory;
        private long vCores;
    }

}
